function MaskConvert(mask) {
    var str = "".padStart(mask, "1").padEnd(128, "0"),
        newStr = "";
    for (let i = 0; i < 8; i++) {
        newStr += str.slice(i * 16, (i + 1) * 16) + ":";
    }
    newStr = newStr.slice(0, -1);
    //字符串转成数组
    let maskStr = newStr
        .split(":")
        .map((item) => {
            let dexStr = "";
            for (let i = 0; i < 4; i++) {
                let str = item.slice(i * 4, (i + 1) * 4);
                dexStr += bin2dex(str);
            }
            return dexStr;
        })
        .join(":");
    debugger;
    return maskStr;
}
function bin2dex(str) {
    let stack = new StackObject();
    while (str.length != stack.getLength()) {
        stack.push(str[stack.getLength()]);
    }
    let total = 0,
        unit = 1;
    while (!stack.isEmpty()) {
        total += stack.pop() * unit;
        unit *= 2;
    }
    switch (total) {
        case 10:
            return "a";
        case 11:
            return "b";
        case 12:
            return "c";
    }
}
